<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <title>Document</title>
</head>

<body>
    <div id="tableForm">
        <table class="table table-bordered" >
            <thead>
                <tr>
                    <td width='160px'>服务业务项</td>
                    <td>产品资料申报</td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                       <span class="text-danger">*</span>  
                        服务效率满意度
                    </td>
                    <td>
                        <label class="radio-inline">
                            <input type="radio" name="item"   value="1"> 非常满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item"   value="2"> 满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item"   value="3"> 基本满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item"   value="4"> 不满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item"   value="5"> 非常不满意
                        </label>
                        <div id="tip" class="text-danger" style="display: none;">
                            请从以下选填项，至少选择一项差评原因进行评价
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        流程指引是否清晰
                    </td>
                    <td>
                        <label class="radio-inline">
                            <input type="radio" name="item1"   value="1"> 非常满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item1"   value="2"> 满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item1"   value="3"> 基本满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item1"   value="4"> 不满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item1"   value="5"> 非常不满意
                        </label>
                    </td>
                </tr>
                <tr>
                    <td>
                        办事程序是否便利
                    </td>
                    <td>
                        <label class="radio-inline">
                            <input type="radio" name="item2"   value="option2"> 非常满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item2"   value="option2"> 满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item2"   value="option2"> 基本满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item2"   value="option2"> 不满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item2"   value="option2"> 非常不满意
                        </label>
                    </td>
                </tr>
                <tr>
                    <td>
                        材料手续是否精简
                    </td>
                    <td>
                        <label class="radio-inline">
                            <input type="radio" name="item3"   value="option2"> 非常满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item3"   value="option2"> 满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item3"   value="option2"> 基本满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item3"   value="option2"> 不满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item3"   value="option2"> 非常不满意
                        </label>
                    </td>
                </tr>
                <tr>
                    <td>
                        操作界面是否友好
                    </td>
                    <td>
                        <label class="radio-inline">
                            <input type="radio" name="item4"   value="option2"> 非常满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item4"   value="option2"> 满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item4"   value="option2"> 基本满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item4"   value="option2"> 不满意
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="item4"   value="option2"> 非常不满意
                        </label>
                    </td>
                </tr>
                <tr>
                    <td>
                        改进建议
                    </td>
                    <td>
                        <textarea class="form-control"  name="text" rows="3"></textarea>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="text-center">
            <button class="btn btn-primary" id="submit">提&nbsp;&nbsp;交</button>
        </div>
    </div>
    <script src="js/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="js/bootstrap.min.js"></script>
    <script>
        $(function(){
            function getFrom(){
                var form = {};
                var isChecked = false;
                $("#tableForm input:checked").each(function(){
                    var $el = $(this)
                    var val =  $el.val();
                    var name = $el.attr('name');
                    form[name] = val
                    if(val) isChecked = true
                });
                form.text = $("#tableForm textarea").val()
                if(!isChecked){
                    $("#tip").show()
                }else{
                    $("#tip").hide()
                }
            }
            $("#submit").click(getFrom)
        })
    </script>

</body>

</html>